import request from '@/utils/request'

// 查询物料借用列表
export function listBorrow(query) {
  return request({
    url: '/wms/borrow/list',
    method: 'get',
    params: query
  })
}

// 查询物料借用详细
export function getBorrow(borrowUuid) {
  return request({
    url: '/wms/borrow/' + borrowUuid,
    method: 'get'
  })
}

// 新增物料借用
export function addBorrow(data) {
  return request({
    url: '/wms/borrow',
    method: 'post',
    data: data
  })
}

// 修改物料借用
export function updateBorrow(data) {
  return request({
    url: '/wms/borrow',
    method: 'put',
    data: data
  })
}

// 删除物料借用
export function delBorrow(borrowUuid) {
  return request({
    url: '/wms/borrow/' + borrowUuid,
    method: 'delete'
  })
}
